//
//  baomingView.m
//  HappyStore
//
//  Created by 点点充 on 16/2/3.
//  Copyright © 2016年 LLJ. All rights reserved.
//

#import "baomingView.h"

@interface baomingView ()
{
    UIButton *buttonOK;
    
    
}
@end

@implementation baomingView

+ (baomingView *)sharedSelectedAddress
{
    static baomingView *_sharedService = nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedService = [[baomingView alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _sharedService.backgroundColor = [[UIColor colorWithWhite:0.6 alpha:1.0f] colorWithAlphaComponent:0.7];
    });
    return _sharedService;
}

#pragma mark -
- (void)btnClickDate
{
    self.hidden = NO;
    //加入手势来取消键盘
    UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc]
                                             initWithTarget:self action:@selector(dismissView)];
    tapRecognizer.cancelsTouchesInView = NO;
    [self addGestureRecognizer:tapRecognizer];
    
    UIView *viewBack = [[UIView alloc] initWithFrame:(CGRect){0,30,320,40}];
    viewBack.backgroundColor = [UIColor colorWithRed:235/255.f green:236/255.f blue:237/255.f alpha:1.f];
    [self addSubview:viewBack];
    
    
    buttonOK = [UIButton buttonWithType: UIButtonTypeCustom];
    [buttonOK setTitle: @"确  定" forState: UIControlStateNormal];
    [buttonOK setFrame: CGRectMake(320-60, 5, 50, 30)];
    [buttonOK setTintColor: [UIColor grayColor]];
    buttonOK.layer.cornerRadius = 5;
    [buttonOK setBackgroundColor:[UIColor colorWithRed:32/255.0f green:165/255.0f  blue:240/255.0f alpha:1.0f]];
    [buttonOK addTarget: self action: @selector(buttobClicked:) forControlEvents: UIControlEventTouchUpInside];
    buttonOK.titleLabel.font = [UIFont systemFontOfSize:15.f];
    [viewBack addSubview:buttonOK];
    
    [[[[UIApplication sharedApplication] windows] firstObject] addSubview:self];
    

}


- (void)buttobClicked:(UIButton *)sender
{
    
    
}

- (void)dismissView
{
    self.hidden = YES;
}

@end
